package com.yunhe.policyfulfillment.authority.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.policyfulfillment.authority.domain.PolicyRole;
import com.yunhe.policyfulfillment.authority.model.PolicyRoleQueryCondition;

import java.util.List;

/**
 * @author zhengbo
 * @date 2021/9/17 17:18
 */
public interface PolicyRoleService {

    /**
     * 新增
     * @author zb
     * @date 2021/09/17
     * @param policyRole 角色
     * @return int
     **/
    int createPolicyRoleSelective(PolicyRole policyRole) throws ArgumentErrorException;

    /**
     * 刪除
     * @author zb
     * @date 2021/09/17
     * @param id id
     * @return int
     **/
    int deletePolicyRoleByPrimaryKey(Long id) throws ArgumentErrorException;

    /**
     * 刪除
     * @author zb
     * @date 2021/09/17
     * @param ids ids
     **/
    void deletePolicyRoleByIds(String ids) throws ArgumentErrorException;

    /**
     * 更新
     * @author zb
     * @date 2021/09/17
     * @param policyRole 角色
     * @return int
     **/
    int updatePolicyRoleByPrimaryKeySelective(PolicyRole policyRole) throws ArgumentErrorException;

    /**
     * 根据主键查询
     * @author zb
     * @date 2021/09/17
     * @param id id
     * @return PolicyRole
     **/
    PolicyRole searchPolicyRoleByPrimaryKey(Long id);

    /**
     * 查询列表
     * @author zb
     * @date 2021/09/17
     * @param policyRoleQueryCondition 查询对象
     * @return List<PolicyRole>
     **/
    List<PolicyRole> searchPolicyRoleList(PolicyRoleQueryCondition policyRoleQueryCondition);

    /**
     * 查询列表
     * @author zb
     * @date 2021/09/17
     * @param policyRoleQueryCondition 查询对象
     * @return PageResult<List<PolicyRole>>
     **/
    PageResult<PolicyRole> searchPolicyRoleForPage(PolicyRoleQueryCondition policyRoleQueryCondition);

    /**
     * 角色绑定解绑菜单
     * @author zb
     * @date 2021/09/17
     * @param roleId,menuIds 角色id，菜单id列表
     **/
    void roleBindOrUnbindMenu(Long roleId, String menuIds);
}
